import api from '../../../utils/api';
export default {
    data(){
        return{
            formLabelWidth:'80px',
            dialogEngineer:false,
            examineData:{

            },
             //查看报告
             checkReport:{
                taskName:"",//任务名称
                reportCode:"",//服务报告编号
                customer:"",//用户
                site:"",//地点
                serviceDate:"",//日期
                servicEngineer:"",//服务工程师
                installation:"",//服务项目
                statusDescript:"",//状态描述
                problemDescript:"",//故障描述
                correctiveAction:"",//处理措施
                furtherActionRequired:"",//是否需要后续工作
                openPoint:"",//遗留问题
                workCompletedOnsite:"",//是否现场完成
                taskGrade:"",//维修评价
                jobDescript:"",//维修评价描述
                gradeCreator:""//评价人
            },
            isInstallation:[],
            isNeed:[]
        }
    },
    methods:{
        //审核人名单
        findHsjUser:async function(){
            this.dialogFormVisible1 = true;
            let data = {
                params:"page="+this.pages+"&rows="+10
            }
            const res = await this.$axios._post(api.findHsjUser,data);
            if(res.data.success){
                this.examineData = res.data.data;
            }
        },
         //checkbox勾选  select
         selectData(selection){
            let t = this
            t.loginName = [];
            t.userName = [];
            t.roleId = [];
            selection.forEach(element => {
                t.loginName.push(element.loginName);
                t.userName.push(element.userName);
                t.roleId.push(element.roleId);
            });
            t.loginNames = t.loginName.join(",");
            t.userNames = t.userName.join(",");
            t.roleIds = t.roleId.join(",");
        },
           //审核人选择后，点击保存
        saveExamineData(){
            this.dialogEngineer = false;
            this.taskData.personName = this.userNames;
            this.loginName = [];
            this.userName = [];
            this.roleId = [];
        },
    }
}